<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    
    </style>
</head>
<body>
    <script>
        function timeDown(y,m,d){
            let ti = new Date();
            let 
                endYear = ti.setFullYear(y).toString(),
                endMonth = ti.setMonth(m),
                endDay = ti.setDate(d);
            let date = {
                "y":endYear,
                "m":endMonth,
                "d":endDay,
            }
            console.log(date);
        };
        timeDown(2020,1,1);
	
	        
    </script>
</body>
</html>